import { ExtractPropTypes } from 'vue'
import { noticeBasicProps, noticeBasicEmits, NoticeModes, NoticeMode } from './type'


/**
 * 滚动轮播通知props参数
 */
export const columnNoticeProps = {
  ...noticeBasicProps,
  /** 滚动方向 horizontal 水平滚动 vertical 垂直滚动 */
  mode: {
    type: String,
    default: 'horizontal',
    validator: (value: NoticeMode) => {
      return NoticeModes.includes(value)
    }
  },
  /** 滚动周期间隔, 单位ms */
  duration: {
    type: [String, Number],
    default: 2000
  }
}
export type ColumnNoticeProps = ExtractPropTypes<typeof columnNoticeProps>

export const columnNoticeEmits = {
  ...noticeBasicEmits
}
export type ColumnNoticeEmits = typeof columnNoticeEmits
